<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
                template="./template/HomemasterAd.xhtml"
                xmlns:h="http://xmlns.jcp.org/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:define name="content_top">
        Service
    </ui:define>

    <ui:define name="content">
        <h3 style="color: blue; ">Edit</h3>
        <h:form prependId="false">
            <p:panelGrid columns="2">
                <p:outputLabel value="Name"></p:outputLabel>
                <p:inputText value="#{serviceManagedBean.service.name}" style="width: 95%;" maxlength="100"></p:inputText>

                <p:outputLabel value="Descriptions"></p:outputLabel>
                <p:inputText value="#{serviceManagedBean.service.descriptions}" style="width: 95%;"></p:inputText>

                <p:outputLabel value="Detail Descriptions"></p:outputLabel>
                <p:editor value="#{serviceManagedBean.service.detailDescription}"/>

                <p:outputLabel value="Price"></p:outputLabel>
                <p:inputText value="#{serviceManagedBean.service.price}"></p:inputText>

                <p:outputLabel value="Status"></p:outputLabel>
                <p:outputLabel value="#{serviceManagedBean.service.status}"></p:outputLabel>

                <p:outputLabel value="Domain"></p:outputLabel>
                <p:selectOneMenu value="#{serviceManagedBean.service.domainID}">
                    <f:selectItems  var="dm" value="#{serviceManagedBean.findDomains()}" itemLabel="#{dm.name}" itemValue="#{dm}"></f:selectItems>
                </p:selectOneMenu>

                <p:outputLabel value=""></p:outputLabel>
                <p:commandButton value="Save" action="#{serviceManagedBean.xulycapnhat()}" ajax="false"></p:commandButton>
            </p:panelGrid>
        </h:form>
    </ui:define>

</ui:composition>
